<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="../mixins/style/base.css" />
    <link rel="stylesheet" href="../mixins/style/normalize.css" />

    <!-- 引入样式 -->
    <!-- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> -->

    <link rel="stylesheet" href="http://localhost:8180/git-my/training-cms/src/node_modules/codemirror/lib/codemirror.css">
    <link rel="stylesheet" href="http://localhost:8180/git-my/training-cms/src/node_modules/codemirror/addon/hint/show-hint.css">
    <link rel="stylesheet" href="http://localhost:8180/git-my/training-cms/src/node_modules/codemirror/theme/monokai.css">
    <script src="http://localhost:8180/git-my/training-cms/src/node_modules/codemirror/lib/codemirror.js"></script>
    <script src="http://localhost:8180/git-my/training-cms/src/node_modules/codemirror/mode/htmlmixed/htmlmixed.js"></script>
    <script src="http://localhost:8180/git-my/training-cms/src/node_modules/codemirror/addon/hint/show-hint.js"></script>
    <script src="http://localhost:8180/git-my/training-cms/src/node_modules/codemirror/addon/hint/html-hint.js"></script>
    <script src="http://localhost:8180/git-my/training-cms/src/node_modules/codemirror//addon/mode/loadmode.js"></script>
    <script src="http://localhost:8180/git-my/training-cms/src/node_modules/codemirror/mode/javascript/javascript.js"></script>
    <script src="http://localhost:8180/git-my/training-cms/src/node_modules/codemirror/addon/selection/active-line.js"></script>
    <script src="http://localhost:8180/git-my/training-cms/src/node_modules/codemirror/mode/clike/clike.js"></script>

    <script src="http://localhost:8180/git-my/training-cms/src/node_modules/codemirror/addon/hint/sql-hint.js"></script>
    <script src="http://localhost:8180/git-my/training-cms/src/node_modules/codemirror/mode/sql/sql.js"></script>
    <script src="http://localhost:8180/git-my/training-cms/src/node_modules/codemirror/addon/hint/sql-hint.js"></script>
    <style>
        .container {
            overflow: hidden;
            position: relative;
            width: calc(100% - 20px);
            margin: 10px 0px 50px 10px;
        }

        .search-wrap .el-input,
        .search-wrap .el-select {
            vertical-align: middle;
        }

        .el-table__expanded-cell[class*=cell] {
            padding: 0px;
            padding-left: 48px;
            margin: -1px;
        }


        .CodeMirror {
            font-size: 16px!important;
            height: auto;
        }
    </style>
</head>

<body>

    <div class="container" id="app">





        <m-card class="mt_10" :title="title_01" :collapse="true">
            <el-table class="el-table--mini" hover border highlight-current-row :data="tableData" style="width: 100%">
                <el-table-column label="字段" prop="key" width=200>
                </el-table-column>
                <el-table-column label="值" prop="value">
                </el-table-column>
                <el-table-column label="操作" prop="opt" width=80>
                    <template slot-scope="scope">
                        <el-button type="text" @click="handleEditClick(scope.row)" size="small">编辑</el-button>
                    </template>
                </el-table-column>
            </el-table>
        </m-card>

        <m-card class="mt_20" :title="title_02">
            <el-table class="el-table--mini" hover border highlight-current-row :data="proxy_data.upstream" style="width: 100%">
                <el-table-column type="index" width="30">

                </el-table-column>
                <el-table-column label="地址" prop="server" width=150>
                </el-table-column>
                <el-table-column label="权重" prop="weight" width=60>
                </el-table-column>
                <el-table-column label="机器类型" prop="machine" width=100>
                </el-table-column>
                <el-table-column label="是否备用" prop="isBack" width=100>
                </el-table-column>
                <el-table-column label="备注" prop="remark">
                </el-table-column>
                <el-table-column label="操作" prop="opt" width=120>
                    <template slot-scope="scope">
                        <el-button type="text" @click="handleEditClick(scope.row)" size="small">编辑</el-button>
                    </template>
                </el-table-column>
            </el-table>



        </m-card>

        <m-card class="mt_20" :title="title_03">
            <el-table class="el-table--mini" hover border highlight-current-row :data="proxy_data.rewrite" style="width: 100%">
                <el-table-column type="index" width="30">

                </el-table-column>
                <el-table-column label="匹配路由" prop="reg">
                </el-table-column>
                <el-table-column label="跳转中由" prop="toReg">
                </el-table-column>
                <el-table-column label="优先级" prop="order" width=60>
                </el-table-column>
                <el-table-column label="备注" prop="remark">
                </el-table-column>
                <el-table-column label="操作" prop="opt" width=120>
                    <template slot-scope="scope">
                        <el-button type="text" @click="handleEditClick(scope.row)" size="small">编辑</el-button>
                    </template>
                </el-table-column>
            </el-table>
        </m-card>

        <m-card class="mt_20" :title="title_04">
            <textarea id="code">
upstream mlsc_cube
{
    server 192.168.102.1:8080 weight=1;
    server 192.168.102.2:8080 weight=2;
    server 192.168.102.3:8080 weight=1;
    server 192.168.102.4:8080 backup;
    ip_hash;
    keepalive 2000;
}

server {
    listen 8080 ;
    server_name  www.abc.com/;

    #mlsc 走mlsc_cube负载  多家供商分标识撞拦截
    location /cube/mlsc/ {
        root   html;
        index  index.html index.htm;
        proxy_pass http://mlsc_cube/;
    }

    #保持外观一致性
    location /cube/mlsc/cube/modules/ {
        root /webroot/static/modules;
    }

    #未配置路由,直接转到日志接口
    location = /cube/ {
        proxy_pass http://www.abc.com/xxx/logError?$1;
    }

}  
</textarea>
        </m-card>


        <m-card class="mt_20 none" title="SQL格式化">
            <textarea id="sql">
SELECT
    UserName,
    Age,
    Sex
From UserInfo
Where 1=1
    AND (@UserName IS NULL OR UserName = @UserName)  
    AND (@Sex IS NULL OR Sex = @Sex)  
    AND (@OperateTimeEnd IS NULL OR OperateTime <@OperateTimeEnd )
    AND (@OperateTimeStart IS NULL OR OperateTime >= @OperateTimeStart)
            </textarea>
        </m-card>








    </div>


    <script src="http://localhost:8180//git-my/training-cms/src/lib/jquery.js"></script>
    <script src="http://localhost:8180//git-my/training-cms/src/lib/sea-all.js"></script>

    <script src="http://localhost:8180//git-my/training-cms/src/lib/vue.js"></script>
    <script src="http://localhost:8180//git-my/training-cms/src/lib/vue-router.js"></script>

    <script src="http://localhost:8180//git-my/training-cms/src/page/boot.js"></script>
    <script src="http://localhost:8180//git-my/vue-ladder/src/lib/lodash.js"></script>

    <link rel="stylesheet" href="http://localhost:8180//git-my/training-cms/src/lib/font-awesome/css/font-awesome.css">

    <!-- 引入组件库 -->
    <!-- <script src="https://unpkg.com/element-ui/lib/index.js"></script> -->
    <link rel="stylesheet" href="http://localhost:8180//git-my/training-cms/src/lib/elementui/index.css">

    <script src="http://localhost:8180//git-my/training-cms/src/lib/elementui/index.js"></script>
    <script src="http://localhost:8180//git-my/training-cms/src/lib/elementui/zh-CN.js"></script>

    <script src="http://localhost:8180//git-my/training-cms/src/mixins/global.mixins.js"></script>

    <script>
        $(function () {
            // inlineBlock 兼容safari
            function inlineBlockHack() {
                $('.inline-block-container').contents().filter(function () {
                    return this.nodeType === 3;
                }).remove();
            }
            inlineBlockHack();
        });
    </script>

    <script>
        $(function () {
            seajs.use('page/04-supplierInfo.js');
        })
    </script>



</body>